import {Global, Inject, Injectable} from '@nestjs/common';
@Global()
@Injectable()
export class LogService {
    constructor (
        @Inject('PREFIX') private readonly prefix: string, // 依赖注入的方式
    ) { }

    log(str: string): void {
        console.log(`${this.prefix}-${str}`);
    }

    error(str: string): void {
        console.log(str);
    }
}
